#ifndef GRAPHTAB_H
#define GRAPHTAB_H

#include <QtGui/QWidget>
#include <QtSql>

#include "accountmodel.h"
#include "tab.h"

namespace Ui {
	class GraphTab;
}

class GraphTab : public Tab {
	Q_OBJECT
	Q_DISABLE_COPY(GraphTab)
public:
	explicit GraphTab(QWidget *parent = 0);
	virtual ~GraphTab();

	virtual void updateContents();
	virtual void flushData();

	void cleanup();
	void initializeModel();

protected:
	virtual void changeEvent(QEvent *e);

private:
	Ui::GraphTab *m_ui;
	AccountModel *m_accountModel;

	void disableButtonsIfNecessary();
	int currentAccount() const;

private slots:
	void on_accountFilter_currentIndexChanged(int index);
};

#endif // GRAPHTAB_H
